fix(opencode): correct Codex OAuth GPT-5.6 context window - #39082
Open
GameOn223 wants to merge 1 commit into
Open
fix(opencode): correct Codex OAuth GPT-5.6 context window#39082GameOn223 wants to merge 1 commit into
GameOn223 wants to merge 1 commit into
Conversation
OpenAI corrected the GPT-5.6 Sol, Terra and Luna context windows to 272k in Codex CLI 0.144.6, and 0.145.0's bundled models.json still reports 272000 for all three. The OAuth transform kept the earlier 372k input override, which delays compaction past the window the Codex harness advertises. That makes 5.6 identical to 5.5, so the two branches collapse into one.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Found Related PRPR #38987: fix(core): honor Codex input limits This PR is related to your current PR #39082. Both address Codex model limits and input handling. PR #38987 focuses on the core layer honoring Codex input limits, while your PR corrects the OAuth transform's GPT-5.6 context window from 372k to 272k. These appear to be complementary fixes for the same issue (#38976) affecting different layers of the system. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #38976
Type of change
What does this PR do?
The Codex OAuth transform still pins GPT-5.6 Sol/Terra/Luna to a 372k input window. OpenAI corrected those context windows to 272k in Codex CLI 0.144.6, so we were letting sessions run past the window the Codex harness itself advertises, which delays compaction.
Codex 0.145.0's bundled
models.jsonreportscontext_window: 272000for all three 5.6 variants — the same as 5.5. Since the two branches now produce an identical object, I merged them rather than duplicating it.Only affects the OAuth path; API-key metadata still uses the provider's own limits.
How did you verify your code works?
Pulled
models.jsonfromopenai/codexatrust-v0.145.0and confirmedgpt-5.6-sol,gpt-5.6-terraandgpt-5.6-lunaall reportcontext_windowandmax_context_windowof272000.The existing test in
packages/opencode/test/plugin/codex.test.tsasserted the old 500k/372k values, so I updated those three expectations and ran:Screenshots / recordings
Not a UI change.
Checklist